package nc.vo.gsp.pub.monthsum;

import java.util.HashMap;

import nc.vo.scm.pub.smart.SmartFieldMeta;
import nc.vo.scm.pub.smart.SmartVOMeta;

@SuppressWarnings( { "unchecked", "serial", "deprecation", "unused" })
public class MonthVOMeta extends SmartVOMeta {

	public MonthVOMeta() {
		HashMap map = new HashMap();

		String[] sa_names = SqlMonthSum.getFlds_Month_Record_All();
		String[] sa_num_hand = SqlMonthSum.getFlds_Month_Hand_Sum();
		sa_names = (String[]) SqlHelper.arrayAppend(sa_names, sa_num_hand);

		for (int i = 0; i < sa_names.length; i++) {
			SmartFieldMeta f = new SmartFieldMeta();
			f.setName(sa_names[i]);
			if (sa_names[i].endsWith("num") || sa_names[i].equals("hsl")
					|| sa_names[i].endsWith("mny"))
				f.setType(SmartFieldMeta.JAVATYPE_UFDOUBLE);
			else if (sa_names[i].equals("fbillflag"))
				f.setType(SmartFieldMeta.JAVATYPE_INTEGER);
			else
				f.setType(SmartFieldMeta.JAVATYPE_STRING);

			map.put(sa_names[i], f);
		}

		super.setColumns(map);
	}
}
